<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>需求管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    
    <!-- 添加全局样式 -->
    <style>
        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        .navbar {
            box-shadow: 0 2px 4px rgba(0,0,0,.05);
        }
        
        .navbar-brand i {
            margin-right: 8px;
        }
        
        .container-main {
            flex: 1;
            padding-top: 2rem;
            padding-bottom: 6rem;
        }
        
        .card:hover {
            transform: translateY(-5px);
            transition: transform 0.2s ease-in-out;
        }
        
        .hover-lift {
            transition: all 0.2s ease-in-out;
        }
        
        .hover-lift:hover {
            transform: translateY(-5px);
        }
        
        .footer {
            background-color: #f8f9fa;
            padding-top: 3rem;
            padding-bottom: 3rem;
            margin-top: auto;
        }
        
        .footer a {
            color: #6c757d;
            text-decoration: none;
            margin-right: 1rem;
        }
        
        .footer a:hover {
            text-decoration: underline;
        }
        
        .nav-link i {
            margin-right: 0.5rem;
        }
        
        .alert {
            margin-top: 1rem;
        }
        
        /* 需求卡片样式 */
        .requirement-card {
            border-left: 4px solid #e9ecef;
            transition: border-color 0.3s ease;
        }
        
        .requirement-card:hover {
            border-left-color: #0d6efd;
        }
        
        /* 状态标签 */
        .status-tag {
            display: inline-block;
            padding: 0.25em 0.6em;
            font-size: 0.75em;
            font-weight: 700;
            line-height: 1;
            text-align: center;
            white-space: nowrap;
            vertical-align: baseline;
            border-radius: 0.375rem;
        }
        
        /* 搜索栏增强 */
        .search-bar {
            position: relative;
        }
        
        .search-bar .form-control {
            padding-right: 2.5rem;
        }
        
        .search-bar .bi-search {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: #6c757d;
        }
        
        /* 分页导航 */
        .pagination-container {
            margin-top: 2rem;
            display: flex;
            justify-content: center;
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
        <div class="container">
            <a class="navbar-brand" href="/">
                <i class="bi bi-diagram-3"></i> 需求管理系统
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('hierarchy.index') }}">
                            <i class="bi bi-diagram-3"></i> 业务层级
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('requirements.kanban') }}">
                            <i class="bi bi-kanban"></i> 需求看板
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('requirements.classify') }}">
                            <i class="bi bi-file-earmark-plus"></i> 创建需求
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('requirements.classify') }}">
                            <i class="bi bi-file-earmark-plus"></i> 沟通纪要
                        </a>
                    </li>
                    <!-- 注释掉未实现的报表中心链接 -->
                    <!--
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <i class="bi bi-bar-chart"></i> 报表中心
                        </a>
                    </li>
                    -->
                </ul>
                <span class="navbar-text">
                    <i class="bi bi-person-circle"></i> 管理员
                </span>
            </div>
        </div>
    </nav>

    <div class="container mt-4">
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for category, message in messages %}
                    <div class="alert alert-{{ category }} alert-dismissible fade show">
                        {{ message }}
                        <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                    </div>
                {% endfor %}
            {% endif %}
        {% endwith %}
        
        {% block content %}{% endblock %}
    </div>

    <footer class="mt-5 py-3 bg-light">
        <div class="container text-center">
            <span class="text-muted">需求管理系统 &copy; 2025</span>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    {% block scripts %}{% endblock %}
    <!-- 在<head>中添加Mermaid支持 -->
    <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
    <script>
        mermaid.initialize({ 
            startOnLoad: true,
            theme: 'default',
            securityLevel: 'loose'
        });
    </script>
</body>
</html>
